/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.Date;

/**
 * 
 * @描述：
 * @author： Seven.
 * @创建日期：Jun 9, 2019 11:32:10 PM.
 * @版本：1.0.0
 */
public class EtcOrder extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "EtcOrder";
	public static final String ALIAS_ORDERID = "订单ID";
	public static final String ALIAS_USER_ID = "用户id";
	public static final String ALIAS_BODY = "商品详细描述";
	public static final String ALIAS_DETAIL = "商品详情";
	public static final String ALIAS_PAYMONEY = "订单支付金额,单位为分";
	public static final String ALIAS_PAY_STATUS = "订单支付状态：0未支付，1已支付";
	public static final String ALIAS_ORDER_STATUS = "流程节点状态：1申请成功  2资料审核中  3设备制作中  4运输配送中 5已收货  6自助安装激活";
	public static final String ALIAS_TRANSACTION_ID = "微信支付订单号";
	public static final String ALIAS_SPBILL_CREATE_IP = "终端ip";
	public static final String ALIAS_EXPRESS_COMPANY = "快递公司：1顺丰，2中通，3韵达.....";
	public static final String ALIAS_EXPRESSNO = "快递单号";
	public static final String ALIAS_SH_NAME = "收货人姓名";
	public static final String ALIAS_SH_PHONE = "收货人电话";
	public static final String ALIAS_SH_ADDRESS = "收货地址";
	public static final String ALIAS_CREATE_TIME = "创建时间";
	public static final String ALIAS_UPDATE_TIME = "更新时间";
	public static final String APPLY_ID = "申请id，关联申请表ID字段";
	public static final String ALIAS_DELIVER_USERID = "发货人的userId";
	public static final String ALIAS_DELIVER_TIME = "发货的时间";

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.String orderid;
	private java.lang.String user_id;
	private java.lang.String apply_id;
	private java.lang.String body;
	private java.lang.String detail;
	private java.lang.Integer paymoney;
	private java.lang.Integer pay_status;
	private java.lang.Integer order_status;
	private java.lang.String transaction_id;
	private java.lang.String spbill_create_ip;
	private java.lang.Integer express_company;
	private java.lang.String expressno;
	private java.lang.String sh_name;
	private java.lang.String sh_phone;
	private java.lang.String sh_address;
	private java.util.Date create_time;
	private java.util.Date update_time;
	private java.util.Date deliver_time;
	private java.lang.Integer deliver_userid;
	//columns END

	public EtcOrder(){
	}

	public EtcOrder(
		java.lang.String orderid
	){
		this.orderid = orderid;
	}

	public String getApply_id() {
		return apply_id;
	}

	public void setApply_id(String apply_id) {
		this.apply_id = apply_id;
	}

	/**
	 * 设置订单ID  
	 * @param orderid 订单ID  
	 */  
	public void setOrderid(java.lang.String orderid) {
		this.orderid = orderid;
	}
	
	/**  
	 * 获取订单ID   
	 * @return orderid 订单ID   
	 */
	public java.lang.String getOrderid() {
		return this.orderid;
	}
	/**  
	 * 设置用户id  
	 * @param user_id 用户id  
	 */  
	public void setUser_id(java.lang.String user_id) {
		this.user_id = user_id;
	}
	
	/**  
	 * 获取用户id   
	 * @return user_id 用户id   
	 */
	public java.lang.String getUser_id() {
		return this.user_id;
	}
	/**  
	 * 设置商品详细描述  
	 * @param body 商品详细描述  
	 */  
	public void setBody(java.lang.String body) {
		this.body = body;
	}
	
	/**  
	 * 获取商品详细描述   
	 * @return body 商品详细描述   
	 */
	public java.lang.String getBody() {
		return this.body;
	}
	/**  
	 * 设置商品详情  
	 * @param detail 商品详情  
	 */  
	public void setDetail(java.lang.String detail) {
		this.detail = detail;
	}
	
	/**  
	 * 获取商品详情   
	 * @return detail 商品详情   
	 */
	public java.lang.String getDetail() {
		return this.detail;
	}
	/**  
	 * 设置订单支付金额,单位为分  
	 * @param paymoney 订单支付金额,单位为分  
	 */  
	public void setPaymoney(java.lang.Integer paymoney) {
		this.paymoney = paymoney;
	}
	
	/**  
	 * 获取订单支付金额,单位为分   
	 * @return paymoney 订单支付金额,单位为分   
	 */
	public java.lang.Integer getPaymoney() {
		return this.paymoney;
	}
	/**  
	 * 设置订单支付状态：0未支付，1已支付  
	 * @param pay_status 订单支付状态：0未支付，1已支付，2已退款
	 */  
	public void setPay_status(java.lang.Integer pay_status) {
		this.pay_status = pay_status;
	}
	
	/**  
	 * 获取订单支付状态：0未支付，1已支付   
	 * @return pay_status 订单支付状态：0未支付，1已支付   
	 */
	public java.lang.Integer getPay_status() {
		return this.pay_status;
	}
	/**  
	 * 设置订单状态  订单状态：0待发货  1已发货  2已收货
	 * @param order_status 订单状态：0待发货  1已发货  2已收货
	 */  
	public void setOrder_status(java.lang.Integer order_status) {
		this.order_status = order_status;
	}
	
	/**  
	 * 获取订单状态  订单状态：0待发货  1已发货  2已收货
	 * @return order_status 订单状态：0待发货  1已发货  2已收货
	 */
	public java.lang.Integer getOrder_status() {
		return this.order_status;
	}
	/**  
	 * 设置微信支付订单号  
	 * @param transaction_id 微信支付订单号  
	 */  
	public void setTransaction_id(java.lang.String transaction_id) {
		this.transaction_id = transaction_id;
	}
	
	/**  
	 * 获取微信支付订单号   
	 * @return transaction_id 微信支付订单号   
	 */
	public java.lang.String getTransaction_id() {
		return this.transaction_id;
	}
	/**  
	 * 设置终端ip  
	 * @param spbill_create_ip 终端ip  
	 */  
	public void setSpbill_create_ip(java.lang.String spbill_create_ip) {
		this.spbill_create_ip = spbill_create_ip;
	}
	
	/**  
	 * 获取终端ip   
	 * @return spbill_create_ip 终端ip   
	 */
	public java.lang.String getSpbill_create_ip() {
		return this.spbill_create_ip;
	}
	/**  
	 * 设置快递公司：1顺丰，2中通，3韵达.....  
	 * @param express_company 快递公司：1顺丰，2中通，3韵达.....  
	 */  
	public void setExpress_company(java.lang.Integer express_company) {
		this.express_company = express_company;
	}
	
	/**  
	 * 获取快递公司：1顺丰，2中通，3韵达.....   
	 * @return express_company 快递公司：1顺丰，2中通，3韵达.....   
	 */
	public java.lang.Integer getExpress_company() {
		return this.express_company;
	}
	/**  
	 * 设置快递单号  
	 * @param expressno 快递单号  
	 */  
	public void setExpressno(java.lang.String expressno) {
		this.expressno = expressno;
	}
	
	/**  
	 * 获取快递单号   
	 * @return expressno 快递单号   
	 */
	public java.lang.String getExpressno() {
		return this.expressno;
	}
	/**  
	 * 设置收货人姓名  
	 * @param sh_name 收货人姓名  
	 */  
	public void setSh_name(java.lang.String sh_name) {
		this.sh_name = sh_name;
	}
	
	/**  
	 * 获取收货人姓名   
	 * @return sh_name 收货人姓名   
	 */
	public java.lang.String getSh_name() {
		return this.sh_name;
	}
	/**  
	 * 设置收货人电话  
	 * @param sh_phone 收货人电话  
	 */  
	public void setSh_phone(java.lang.String sh_phone) {
		this.sh_phone = sh_phone;
	}
	
	/**  
	 * 获取收货人电话   
	 * @return sh_phone 收货人电话   
	 */
	public java.lang.String getSh_phone() {
		return this.sh_phone;
	}
	/**  
	 * 设置收货地址  
	 * @param sh_address 收货地址  
	 */  
	public void setSh_address(java.lang.String sh_address) {
		this.sh_address = sh_address;
	}
	
	/**  
	 * 获取收货地址   
	 * @return sh_address 收货地址   
	 */
	public java.lang.String getSh_address() {
		return this.sh_address;
	}
	/**  
	 * 设置创建时间  
	 * @param create_time 创建时间  
	 */  
	public void setCreate_time(java.util.Date create_time) {
		this.create_time = create_time;
	}
	
	/**  
	 * 获取创建时间   
	 * @return create_time 创建时间   
	 */
	public java.util.Date getCreate_time() {
		return this.create_time;
	}
	/**  
	 * 设置更新时间  
	 * @param update_time 更新时间  
	 */  
	public void setUpdate_time(java.util.Date update_time) {
		this.update_time = update_time;
	}

	public Date getDeliver_time() {
		return deliver_time;
	}

	public void setDeliver_time(Date deliver_time) {
		this.deliver_time = deliver_time;
	}

	public Integer getDeliver_userid() {
		return deliver_userid;
	}

	public void setDeliver_userid(Integer deliver_userid) {
		this.deliver_userid = deliver_userid;
	}

	/**
	 * 获取更新时间   
	 * @return update_time 更新时间   
	 */
	public java.util.Date getUpdate_time() {
		return this.update_time;
	}

	@Override
    public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("orderid",getOrderid())
			.append("user_id",getUser_id())
			.append("body",getBody())
			.append("detail",getDetail())
			.append("paymoney",getPaymoney())
			.append("pay_status",getPay_status())
			.append("order_status",getOrder_status())
			.append("transaction_id",getTransaction_id())
			.append("spbill_create_ip",getSpbill_create_ip())
			.append("express_company",getExpress_company())
			.append("expressno",getExpressno())
			.append("sh_name",getSh_name())
			.append("sh_phone",getSh_phone())
			.append("sh_address",getSh_address())
			.append("create_time",getCreate_time())
			.append("update_time",getUpdate_time())
			.toString();
	}
	
	@Override
    public int hashCode() {
		return new HashCodeBuilder()
			.append(getOrderid())
			.toHashCode();
	}
	
	@Override
    public boolean equals(Object obj) {
		if(obj instanceof EtcOrder == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcOrder other = (EtcOrder)obj;
		return new EqualsBuilder()
			.append(getOrderid(),other.getOrderid())
			.isEquals();
	}
}

